home *** CD-ROM | disk | FTP | other *** search
/ Diccionario Visual Trilingue / VISUAL.iso / SHARED.DIR / 10010_Volume Bar Script.ls < prev    next >
Encoding:
Text File  |  1997-07-04  |  680 b   |  31 lines

  1. global gSoundLevel
  2.  
  3. on mouseDown
  4.   set soundLevel to gSoundLevel
  5.   if the mouseH > SpriteRight(29) then
  6.     set Direction to 1
  7.   else
  8.     set Direction to 2
  9.   end if
  10.   repeat while the mouseDown
  11.     set X to the mouseH
  12.     if (X > SpriteRight(29)) and (Direction = 1) then
  13.       set soundLevel to soundLevel + 1
  14.       if soundLevel > 7 then
  15.         set soundLevel to 7
  16.       end if
  17.     else
  18.       if (X < SpriteLeft(29)) and (Direction = 2) then
  19.         set soundLevel to soundLevel - 1
  20.         if soundLevel < 0 then
  21.           set soundLevel to 0
  22.         end if
  23.       end if
  24.     end if
  25.     set gSoundLevel to soundLevel
  26.     setSound()
  27.     updateStage()
  28.   end repeat
  29.   beep()
  30. end
  31.